<?php
/* @var $this TrxPaymentController */
/* @var $model TrxPayment */


$this->breadcrumbs=array(
	'Trx Payments'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List TrxPayment', 'url'=>array('index')),
	array('label'=>'Create TrxPayment', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#trx-payment-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Menu Pembayaran</h1>
<a href="<?php echo Yii::app()->createUrl('trxPayment/create'); ?>" class="btn btn-sm btn-primary">Input Pembayaran</a><br /><br />

<?php //echo CHtml::link('Advanced Search','#',array('class'=>'search-button btn')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView',array(
	'itemsCssClass'=>'table table-hover table-striped table-bordered table-condensed',
	'id'=>'trx-payment-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		//'id',
		//'jenis_asuransi',
		array(
			'header'=>'Jenis',
			'name'=>'jenis_asuransi',
			'value' => '$data->jenis_asuransi == 1 ? "Health": ($data->jenis_asuransi == 2 ? "Non Health" : "")',
		),
		'id_ndk',
		'nominal',
		'installment_ke',
		//'createdby',
		/*
		'createdtime',
		'updatedby',
		'updatedtime',
		*/
		array(
			'class'=>'bootstrap.widgets.TbButtonColumn',
		),
	),
)); ?>